package web.common.internal.jdo.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import web.common.core.util.AssertUtil;

/**
 * @author Jin Zheng
 * @since 1.0 2022-01-12
 */
@Getter
@Setter
@Component
@ConfigurationProperties("web.jdo")
public class JdoProperties implements InitializingBean {
	private String scanPackages;
	private boolean escape = true;
	private DataSourceProperties datasource;

	public JdoProperties() {
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		AssertUtil.notEmpty(scanPackages, "scan-packages");
	}
}
